package service

import (
	"GinShop/mapper"
	"GinShop/model"
)

type FoodCategoryService struct {
}

func NewFoodCategoryService() *FoodCategoryService {
	return &FoodCategoryService{}
}

/**
 * 获取美食类别
 */
func (fcs *FoodCategoryService) Categories() []model.FoodCategory {
	//数据库操作层
	foodCategoryMapper := mapper.NewFoodCategoryMapper()
	return foodCategoryMapper.QueryCategories()
}
